<template>
	<view>
		<view style="display: flex;justify-content: start;align-items: flex-end;">
			<view style="margin-left: 20rpx; font-size: 40rpx;font-weight: 700;">
				全部评价
			</view>
			<view style="margin-left: 15rpx; color: gray;font-size: 30rpx;">
				({{total}}条)
			</view>
		</view>
		
		<view v-for="(item,index) in comment" :key="index" style="margin-top: 20rpx;">
			<view class="card-sec-sec">
				<view class="left">
					<image :src="item.userAvatar" mode=""></image>
				</view>
				<view class="right">
					<view class="fir-txt">
						{{item.nickName}}
					</view>
					<view class="sec-txt">
						<uni-icons type="star-filled" v-for="count in item.benefitScores" color='#FFCE0A'
							size='20'></uni-icons>
					</view>
				</view>
				
			</view>
			<view class="card-sec-thir">
				{{item.content}}
			</view>
		</view>
	</view>
</template>

<script>
	import requestHttp from '@/providers/essential/httpService.js'
	export default {
		data() {
			return {
				comment: [],
				total:0
			}
		},
		methods: {
			getComment() {
				requestHttp.getData('/app-api/pz/service-manage-comment/page', {
					serviceManageId: 3
				}).then((res) => {
					this.comment = res.data.list
					this.total=res.data.total
				})
			},
		},
		onLoad() {
			this.getComment()
		}
	}
</script>

<style lang="scss" scoped>
	.card-sec-sec {
		display: flex;
		padding: 20rpx;

		image {
			height: 80rpx;
			width: 80rpx;
			border-radius: 50%;
		}

		.right {
			padding-left: 20rpx;

			.fir-txt {
				font-size: 36rpx;
				font-weight: bold;
			}

			.sec-txt {
				display: flex;

				text {
					padding-right: 5rpx;
					font-size: 32rpx;
					color: #FFCE0A;
				}
			}
		}

	}

	.card-sec-thir {
		font-size: 36rpx;
		color: #999999;
		padding: 10rpx 25rpx;
		margin-bottom: 40rpx;
	}

</style>